load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "raftentry",
    srcs = [
        "cache.go",
        "metrics.go",
        "ring_buffer.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/kv/kvserver/raftentry",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/kv/kvpb",
        "//pkg/raft/raftpb",
        "//pkg/roachpb",
        "//pkg/util",
        "//pkg/util/metric",
        "//pkg/util/syncutil",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "raftentry_test",
    size = "small",
    srcs = [
        "cache_test.go",
        "ring_buffer_test.go",
    ],
    embed = [":raftentry"],
    deps = [
        "//pkg/kv/kvpb",
        "//pkg/raft/raftpb",
        "//pkg/roachpb",
        "//pkg/util/leaktest",
        "@com_github_stretchr_testify//require",
    ],
)
